﻿<UserControl x:Class="Shatkotha.WPF.Contacts.Views.ContactListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" MinHeight="150">
    <Grid>
        <ListView ItemsSource="{Binding PersonListProperty}" x:Name="listviewpersons" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" MinWidth="700" >
            <ListView.View>
                <GridView>
                    <GridViewColumn Width="100" Header="Name" DisplayMemberBinding="{Binding Name}"></GridViewColumn>
                    <GridViewColumn Width="100" Header="Age" DisplayMemberBinding="{Binding Age}"></GridViewColumn>
                    <GridViewColumn Width="100" Header="Sex" DisplayMemberBinding="{Binding Sex}"></GridViewColumn>
                    <GridViewColumn Width="100" Header="Location" DisplayMemberBinding="{Binding Location}"></GridViewColumn>
                    <GridViewColumn Width="100" Header="Email" DisplayMemberBinding="{Binding Email}"></GridViewColumn>
                    <GridViewColumn Width="100" Header="Phone" DisplayMemberBinding="{Binding Phone}"></GridViewColumn>
                    <GridViewColumn Width="200" Header="">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Button Margin="2,0" Command="{Binding SendSMSCommand}">SMS</Button>
                                    <Button Margin="2,0" Command="{Binding SendEmailCommand}">Email</Button>
                                    <Button Margin="2,0" Command="{Binding SendCallCommand}">Call</Button>
                                    <Button Margin="2,0" Command="{Binding EditCommand}">Edit</Button>
                                    <Button Margin="2,0" Command="{Binding DeleteCommand}">Delete</Button>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
